package com.qf.service.impl;

import com.qf.dao.AddressDao;

import com.qf.dao.impl.AddressDaoImpl;
import com.qf.pojo.Address;
import com.qf.service.AddressService;

import java.util.List;

public class AddressServiceImpl implements AddressService {
 private AddressDao addressDao=new AddressDaoImpl();


    @Override
    public int addOne(Address address) {
        return addressDao.addOne(address);
    }


    @Override
    public List<Address> listAll(Integer uid) {
        return addressDao.selectAll(uid);
    }

    @Override
    public int clearDefault(Integer uid) {
        return addressDao.clearDefault(uid);
    }

    @Override
    public int setDefault(Integer uid, Integer aid) {
        return addressDao.setDefault(uid,aid);
    }

    @Override
    public Address selectOne(Integer aid) {
        return addressDao.selectOne(aid);
    }
}
